package com.tm.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tm.dto.OrderQueryDto;
import com.tm.entity.OrderEntity;
import com.tm.service.OrderService;
import com.tm.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PROJECT_NAME: tm-wm-syb
 * @DESCRIPTION:
 * @USER: DELL
 * @DATE: 2023/4/10 8:24
 */
@RestController
@RequestMapping("order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("page")
    public R query(@RequestBody OrderQueryDto orderQueryDto){
        Page<OrderEntity> page = orderService.query(orderQueryDto);
        return R.success(page);
    }
}
